From: Keir Fraser Date: Wed, 8 Apr 2009 08:02:22 +0000 (+0100) Subject: xend: fix c/s 19510 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13988^2~18 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=bd5e620a8b895fd8716f8662de9cf5e2e2c51d67;p=xen.git xend: fix c/s 19510 Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xend/server/pciif.py b/tools/python/xen/xend/server/pciif.py index 92b32a3b45..730274c31b 100644 --- a/tools/python/xen/xend/server/pciif.py +++ b/tools/python/xen/xend/server/pciif.py @@ -71,6 +71,10 @@ class PciController(DevController): pcidevid = 0 vslots = "" for pci_config in config.get('devs', []): + vslot = pci_config.get('vslot') + if vslot is not None: + vslots = vslots + vslot + ";" + domain = parse_hex(pci_config.get('domain', 0)) bus = parse_hex(pci_config.get('bus', 0)) slot = parse_hex(pci_config.get('slot', 0)) @@ -83,10 +87,6 @@ class PciController(DevController): opts = reduce(lambda x, y: x+','+y, opts) back['opts-%i' % pcidevid] = opts - vslot = pci_config.get('vslot') - if vslot is not None: - vslots = vslots + vslot + ";" - back['dev-%i' % pcidevid] = "%04x:%02x:%02x.%01x" % \ (domain, bus, slot, func) back['uuid-%i' % pcidevid] = pci_config.get('uuid', '')